package ribbon.consumer.config;


import com.xylink.config.SDKConfigMgr;
import com.xylink.config.SignatureVersion;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import sun.applet.AppletListener;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;


/**
 * 小鱼易连环境初始化配置类
 */
@Lazy
@Component
public class XylinkInitConf implements ApplicationRunner {

    @Resource
    private XylinkConf xylinkConf;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        SDKConfigMgr.initSDKConfig(xylinkConf.getApi_host(), xylinkConf.getClient_id(), xylinkConf.getClient_secret(), xylinkConf.getEnterprise_id(), SignatureVersion.Signature_3_0);

    }
}
